package com.qut.qut_01.controller;

import com.qut.qut_01.mapper.selfInfMapper;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/user")
public class selfInfController {
    @Resource
    private com.qut.qut_01.mapper.selfInfMapper selfInfMapper;
    @RequestMapping("/reg")
    public int reg(@RequestParam Map<String,String> param){
        int row=0;
        System.out.println(param);
        row=selfInfMapper.save(param);
        return row;
    }
    @RequestMapping("/search")
    public List<Map<String,Object>> search(@RequestParam Map<String,String> param){
        List<Map<String,Object>> list=null;
        list=selfInfMapper.search(param);

        return list;
    }
}
